//
//  OSSImageUploader.h
//  Receipt
//
//  Created by admin on 2019/3/19.
//  Copyright © 2019 LG. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, UploadImageState) {
    UploadImageFailed   = 0,
    UploadImageSuccess  = 1
};

// 当前上传段长度、当前已经上传总长度、一共需要上传的总长度
typedef void(^HBUploadImageManageProgressBlock)(int64_t bytesSent, int64_t totalByteSent ,int64_t totalBytesExpectedToSend);

NS_ASSUME_NONNULL_BEGIN

@interface OSSImageUploader : NSObject

+ (instancetype)sharedLoader;

- (void)asyncUploadImage:(UIImage *)image complete:(void(^)(NSArray<NSString *> *names,UploadImageState state))complete;

- (void)syncUploadImage:(UIImage *)image complete:(void(^)(NSArray<NSString *> *names,UploadImageState state))complete;

- (void)asyncUploadImages:(NSArray<UIImage *> *)images complete:(void(^)(NSArray<NSString *> *names, UploadImageState state))complete;

- (void)syncUploadImages:(NSArray<UIImage *> *)images complete:(void(^)(NSArray<NSString *> *names, UploadImageState state))complete;


///异步单个上传视频
- (void)asyncUploadVideo:(NSData *)data progress:(HBUploadImageManageProgressBlock)progressBlock complete:(void(^)(NSArray<NSString *> *names, UploadImageState state))complete;
///同步单个上传视频
- (void)syncUploadVideo:(NSData *)data progress:(HBUploadImageManageProgressBlock)progressBlock complete:(void(^)(NSArray<NSString *> *names, UploadImageState state))complete;



/**
 根据图片名称删除图片

 @param path 图片名 路径
 @param complete 回调
 */
- (void)deleteImageWithPath:(NSString *)path complete:(void(^)(BOOL success))complete;

@end

NS_ASSUME_NONNULL_END
